home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / earkit / news / thor / rexx / edge / cool.edge < prev    next >
Text File  |  1998-05-24  |  945b  |  48 lines

  1. /*
  2. ** $VER: Cool.edge 1.0 (13.1.96)
  3. ** Coolify (using "TEXT COOLER v1.0 by 
  4. ** DDT of the HALF-BRAINS TEAM")
  5. ** text block - by Troels Walsted Hansen
  6. ** added Edge support - Kirk A. Hans 
  7. ** Function: for now, it takes the text from the current line position to the
  8. **              end of the file and makes it "cool". Will added block support in
  9. **             the next version */
  10.  
  11. options results
  12.  
  13. getenvvar _WE_CursorY
  14. currline = result
  15.  
  16. getenvvar _WE_CursorX
  17. currcolumn = result
  18.  
  19. getenvvar _FE_Lines
  20. lastline = result
  21.  
  22. call open(tfh, "t:UncoolTempFile", W)
  23.  
  24. do i=currline to lastline
  25.     'Position' LINE i
  26.     getenvvar _WE_CLine RAW
  27.         lin = result
  28.  
  29.     if(lin~= "") then do
  30.     delete LINE
  31.     i = i-1
  32.     end
  33.     else break
  34.  
  35.     call writech(tfh,lin)
  36. end
  37.  
  38. call close(tfh)
  39.  
  40. address command "Cool >nil: t:UncoolTempFile t:CoolTempFile"
  41. call delete("t:UncoolTempFile")
  42.  
  43. Position currcolumn currline
  44. INCLUDE "t:CoolTempFile"
  45. call delete("t:CoolTempFile")
  46.  
  47. Position currcolumn currline
  48.